package com.atguigu.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author ：jjt8024
 * @date ：Created in 2020/12/5 10:59
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {

    private Integer code;
    private String message;
    private T data;

    /**
     *  只有 code message 的构造方法
     * @param code
     * @param message
     */
    public CommonResult(Integer code ,String message){
        this(code,message,null);
    }
}
